<script>
export default {
  name: "sonCom1",
  data(){
    return {
      msg:'子组件的数据'
    }
  },
  methods:{
    giveFather(){
      this.$emit('fromSon','子组件的数据固定')

    }
  },
  created() {
    // 挂载到vue实例上的  $emit
    // this.$emit('fromSon',this.msg)
  },

}
</script>

<template>
  <div>子组件1111
    <button @click="giveFather">点击传参</button>

  </div>
</template>

<style scoped lang="less">

</style>